//
//  OrderPriceTableViewCell.swift
//  ZNZXSuperMarket
//
//  Created by 四川中农 on 2018/8/3.
//  Copyright © 2018年 四川中农. All rights reserved.
//

import UIKit

class OrderPriceTableViewCell: UITableViewCell {

    @IBOutlet weak var price: UILabel! // 商品金额
    @IBOutlet weak var couponLabel: UILabel! // 优惠金额
    @IBOutlet weak var total: UILabel! // 总计
    @IBOutlet weak var freight: UILabel! // 运费
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    func reload(withGoodsPrice price:String,couponMoney:String,freight:String,total:String){
        self.price.text = "￥" + total
        self.couponLabel.text = "￥-" + couponMoney
        self.freight.text = "￥" + freight
        let str = "￥" + price
        self.total.attributedText = Utils.changeLabelTextFontSize(normalString: str, changeString: total.getPriceInteger(), font: UIFont.systemFont(ofSize: 16))
        
    }

}
